package factories;

import logic.nodes.nodeSettings.upgrades.UpgradableSettings;
import logic.ships.hunter.Hunter;
import logic.ships.moveableShip.MovableShipProperties;
import fileHandling.SettingsLoader;

public class MovableShipFactory {
	
	/**
	 * Returns the {@link MovableShipProperties} that belong to the given hunter-path.
	 * @param shipPath The path to the {@link Hunter} (with a / at the end).
	 * @return A new {@link MovableShipProperties}-Object. null, if it could not be created.
	 */
	public static MovableShipProperties getMovableShipProperties(String shipPath) {
		UpgradableSettings settings = SettingsLoader.loadUpgradableSettings(shipPath + "properties.xml");
		return new MovableShipProperties(settings);
	}
}